package org.kiwi.data.config;

import org.springframework.beans.factory.xml.NamespaceHandlerSupport;

/**
 * Created by jack on 16/10/19.
 */
public class DataSourceNamespaceHandler extends NamespaceHandlerSupport {

    @Override
    public void init() {
        registerBeanDefinitionParser("datasource", new DataSourceBeanDefinitionParser());
        registerBeanDefinitionParser("read-write", new ReadWriteSeparationBeanDefinitionParser());
        registerBeanDefinitionParser("db-sharding", new DbShardingBeanDefinitionParser());
        registerBeanDefinitionParser("table-sharding", new TableShardingBeanDefinitionParser());
        registerBeanDefinitionParser("one-phase-commit", new OnePhaseCommitBeanDefinitionParser());
    }
}